/*
 * MODBUS.h
 *
 * Created: 2013-11-11 13:38:37
 *  Author: Piotr
 */ 


#ifndef MODBUS_H_
	#define MODBUS_H_


/* ----------------------- Defines ------------------------------------------*/
	#define REG_INPUT_START 1000
	#define REG_INPUT_NREGS 4

	#define REG_REL1			1000	// relay 1 -> 00 - open
	#define REG_REL2			1001	// relay 2 -> 00 - open
	#define REG_REL1_MODE		1002
	#define REG_REL2_MODE		1003
	#define REG_REL1_CLICK		1004
	#define REG_REL2_CLICK		1005
	#define REG_REL1_ON_TIME	1006
	#define REG_REL2_ON_TIME	1007
	#define REG_REL1_OFF_TIME	1008
	#define REG_REL2_OFF_TIME	1009
	
	#define REG_LED1			1100
	#define REG_LED2			1101
	#define REG_LED3			1002	
	
	#define REG_WD_RESET_COUNT		2000
	#define REG_PWR_RESET_COUNT		2001
	#define REG_PWR_ON_TOTAL_TIME	2002
	#define REG_PWR_ON_LAST_TIME	2003
	#define REG_BUS_FRAME_READ		2004
	#define REG_BUS_FRAME_SEND		2005
	#define REG_BUS_ERROR			2006
	
	
	#define REG_SERIAL_NUMBER_LEN	5000
	#define REG_SERIAL_NUMBER		5001

typedef struct {
	
	

} RELAY_REGS;


#endif /* MODBUS_H_ */